<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>分类</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no"/>
	    <meta http-equiv="Access-Control-Allow-Origin" content="*">
	    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
		<link rel="stylesheet" href="../css/base.css" />
		<link rel="stylesheet" href="css/fenLei.css" />
		<script src="../js/jquery-2.2.3.min.js"></script>
		<script type="text/javascript" src="../js/rem.js"></script>
		<script src="../js/common.js"></script>
		<style>
			.felei_right_li{
				width: 90%;
				height: 1rem;
				margin: 0 auto;
				border-bottom: 1px solid #ccc;
			}
			.felei_right_li a{
				display: block;
				width: 100%;
				height: 100%;
			}
			.felei_right_li a img{
				float: left;
			}
			.felei_right_li a p{
				float: left;
				margin-left: 0.2rem;
				margin-top: 0.1rem;
			}
		</style>
	<body>
		<div class="header">
			<a href="javascript:history.back(-1)"><img src="../img/g_next.png" alt="" /></a>
			分类
		</div>
		<ul class="fenlei_left" style="overflow-y: auto;">
			
		</ul>
		<div class="fenlei_right" style="overflow-y:auto;">
			<p class="title">——商家分类——</p>
			<ul class="felei_right_ul">
				<li class="felei_right_li">
					<a href="#">
						<img src="../img/g_shangpin.png" alt="" />
						<p>电脑</p>
					</a>					
				</li>
			</ul>
		</div>
	</body>
	<script>
		$(function(){
			$('.fenlei_left_li').click(function(){
				$(this).css("background","#FFFFFF");
				$(this).css("border-left","1px solid #EB4748");
				$(this).css("color","#EB4748");
				$(this).siblings().css("background","#F8F8F8");
				$(this).siblings().css("border-left","none");
				$(this).siblings().css("color","#666666");
			})
		})
		$.ajax({
			url:SURL+'/jfd/shopIndustry/list',
			type:'post',
			dataType:'json',
			success:res=>{
				console.log(res)
				res.forEach(element => {
					$('.fenlei_left').append(`
						<li class="fenlei_left_li" data-id="${element.hyId}">
							${element.hyName}
						</li>
					`)
				});
			}
		})
	</script>
</html>
